<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>收费标准</title>
    <link rel="stylesheet" type="text/css" href="../../static/admin/layui2/css/layui.css"/>
</head>
<body class="layui-layout-admin" >
<div class="layui-anim layui-anim-scale">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
        <legend>收费标准</legend>
    </fieldset>

    <table class="layui-hide" id="test"></table>
    <script type="text/html" id="table-jifei">
        {{# if(d.jifeidanwei== 0) { }}
        元/平米*月
        {{# } else{ }}
        元/平米*年
        {{# } }}
    </script>
    <script type="text/html" id="table-huxing">
        {{# if(d.huxing== 'A') { }}
        A户型
        {{# } else if(d.huxing== 'B'){ }}
        B户型
        {{# } else { }}
        C户型
        {{# } }}
    </script>
</div>
</div>
<script src="../../static/admin/layui2/layui.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['element','table','jquery','layer','laydate'], function() {
        var element = layui.element
        var table = layui.table;
        layer = layui.layer
        $ = layui.jquery;
        table.render({
            elem: '#test'
            ,url:'/shoufeibiaozhun/selectAllshoufeibiaozhun'
            ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            ,cols: [[
                {field:'shoufeibiaozhunma', width:160, title: '收费标准码'}
                ,{field:'shoufeibiaozhunmingcheng', width:170, title: '收费标准名称'}
                ,{field:'shoufeixiangmu', width:110, title: '收费项目'}
                ,{field:'danjia', width:80, title: '单价'}
                ,{field:'jifeidanwei',width:100, title: '计 费单位',templet: '#table-jifei'}
                ,{field:'huxing', title: '户型',width:80,templet: '#table-huxing'}
                ,{field:'beizhu', title: '备注'}
            ]]
        });

    });
</script>
</body>
</html>